{include common/header}
{include common/left}
<div id="content">
   <ul class="breadcrumb">
    <li><a href="__ROOT__"><i class="icon-home"></i>首页</a> <span class="divider">/</span></li>
    <li class="active">权限管理 <span class="divider">/</span></li>
    <li class="active">编辑用户</li>
   </ul>
  <div class="container-fluid">
    <div class="row-fluid">
      <div class="span12">
        <div class="widget-box">
          <div class="widget-title"> 
            <h5><span class="icon"> <i class="icon-align-justify"></i> </span>编辑用户</h5>
          </div> 
          <div class="widget-content nopadding">
            <form action="{url('member/edit')}" method="post" class="form-horizontal">
            {if $_G['member']['usergroup']==1}
              <div class="control-group">
                <label class="control-label">用户名</label>
                <div class="controls">
                  <input name="username" value="{$member['username']}" type="text" />
                </div>
              </div>  
              {/if}            
              <div class="control-group">
                <label class="control-label">邮箱</label>
                <div class="controls">
                  <input type="text" value="{$member['email']}" name="email">
                </div>
              </div>
              {if $_G['member']['usergroup']==1}
              <div class="control-group">
                <label class="control-label">用户类型</label>
                <div class="controls">
                  <select name="usergroup">
                  {loop $groups $group}
                  <option value="{$group['id']}" {if $member['usergroup']==$group['id']} selected{/if}>{$group['name']}</option>                  
                  {/loop}
                  </select>
                </div>
              </div>
              {/if}
        <div class="control-group">
          <label class="control-label">真实姓名</label>
          <div class="controls">
            <input type="text" value="{$member['name']}" name="name" />
          </div>
        </div>
       
        <div class="control-group">
          <label class="control-label">电话号码</label>
          <div class="controls">
            <input type="text" value="{$member['phone']}" name="phone" />
          </div>
        </div>
        <div class="control-group">
          <label class="control-label">手机号码</label>
          <div class="controls">
            <input type="text" value="{$member['mobile']}" name="mobile" />
          </div>
        </div>
        <div class="control-group">
          <label class="control-label">QQ号码</label>
          <div class="controls">
            <input type="text" value="{$member['qq']}" name="qq" />
          </div>
        </div>
        <div class="control-group">
          <label class="control-label">地址</label>
          <div class="controls">
            <input type="text" value="{$member['address']}" name="addrss" />
          </div>
        </div>
        {if $_G['member']['usergroup']==1}
        <div class="control-group">
          <label class="control-label">门店</label>
          <div class="controls">
            <input type="text" value="{$member['shop']}" name="shop" />
          </div>
        </div>
        {else}
        <div class="control-group">
          <label class="control-label" style="color:red">网号</label>
          <div class="controls" style="color:red">
            {$member['username']}
          </div>
        </div>
        {/if}
        <div class="control-group">
          <label class="control-label">公司名称</label>
          <div class="controls">
            <input type="text" value="{$member['company']}" name="company" />
          </div>
        </div>
        {if $_G['member']['usergroup']==1}
        <div class="control-group">
          <label class="control-label">公司地址</label>
          <div class="controls">
            <input type="text" value="{$member['company_address']}" name="company_address" />
          </div>
        </div>
        {/if}
        
              <div class="form-actions">
              	<input type="hidden" name="uid" value="{$member['uid']}" />
                <input type="submit" class="btn btn-primary" value="确认">
              </div>
            </form>
          </div>
        </div>
        
      </div>
    </div>
  </div>
</div>
{include common/footer}